

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>The option module &mdash; pyamp v1.2 documentation</title>
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '1.2',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="top" title="pyamp v1.2 documentation" href="../index.html" />
    <link rel="up" title="The config module" href="mod_pyamp_config.html" />
    <link rel="next" title="The parser module" href="pyamp_config_parser.html" />
    <link rel="prev" title="The configFile module" href="pyamp_config_configFile.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="pyamp_config_parser.html" title="The parser module"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="pyamp_config_configFile.html" title="The configFile module"
             accesskey="P">previous</a> |</li>
        <li><a href="../index.html">pyamp v1.2 documentation</a> &raquo;</li>
          <li><a href="mod_pyamp.html" >The pyamp module</a> &raquo;</li>
          <li><a href="mod_pyamp_config.html" accesskey="U">The config module</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="module-pyamp.config.option">
<span id="the-option-module"></span><h1>The option module<a class="headerlink" href="#module-pyamp.config.option" title="Permalink to this headline">¶</a></h1>
<p>The option module contains the Option class for creating a specific
configuration option, as well as the ClOption class for creating a
command line option.</p>
<div class="section" id="the-cloption-class">
<h2>The ClOption class<a class="headerlink" href="#the-cloption-class" title="Permalink to this headline">¶</a></h2>
<p class="graphviz">
<img src="../_images/inheritance-427399279fe3f6a57b0736aa810ba53e169ffa95.png" alt="Inheritance diagram of pyamp.config.option.ClOption" usemap="#inheritance41b4471241" class="inheritance"/>
<map id="inheritance41b4471241" name="inheritance41b4471241">
<area shape="rect" href="#pyamp.config.option.Option" title="pyamp.config.option.Option" alt="" coords="11,7,208,33"/>
<area shape="rect" href="#pyamp.config.option.ClOption" title="pyamp.config.option.ClOption" alt="" coords="5,84,213,111"/>
</map>
</p>
<dl class="class">
<dt id="pyamp.config.option.ClOption">
<em class="property">class </em><tt class="descclassname">pyamp.config.option.</tt><tt class="descname">ClOption</tt><big>(</big><em>name</em>, <em>abbr=None</em>, <em>defaultValue=None</em>, <em>action=None</em>, <em>optionType=None</em>, <em>helpText=None</em>, <em>acceptedValues=None</em>, <em>caseSensitive=True</em><big>)</big><a class="reference internal" href="../_modules/pyamp/config/option.html#ClOption"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyamp.config.option.ClOption" title="Permalink to this definition">¶</a></dt>
<dd><p>The ClOption class encapsulates an <a class="reference internal" href="#pyamp.config.option.Option" title="pyamp.config.option.Option"><tt class="xref py py-class docutils literal"><span class="pre">Option</span></tt></a> that is configurable
through the command line as well as through a configuration file.</p>
<ul class="simple">
<li>name &#8211; The name of the option</li>
<li>abbr &#8211; The abbreviated name</li>
<li>defaultValue &#8211; The default value for this option</li>
<li>action &#8211; The action used for this option</li>
<li>optionType &#8211; The type of the option</li>
<li>helpText &#8211; The help text to display</li>
<li>acceptedValues &#8211; The list of accepted values</li>
<li>caseSensitive &#8211; True if the accepted values are case sensitive</li>
</ul>
<dl class="method">
<dt id="pyamp.config.option.ClOption.addOption">
<tt class="descname">addOption</tt><big>(</big><em>parser</em><big>)</big><a class="reference internal" href="../_modules/pyamp/config/option.html#ClOption.addOption"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyamp.config.option.ClOption.addOption" title="Permalink to this definition">¶</a></dt>
<dd><p>Add the command line option to the command line parser.</p>
<ul class="simple">
<li>parser &#8211; The command line parser</li>
</ul>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="the-clbooloption-class">
<h2>The ClBoolOption class<a class="headerlink" href="#the-clbooloption-class" title="Permalink to this headline">¶</a></h2>
<p class="graphviz">
<img src="../_images/inheritance-084028f0ef45a0b626369f01ff089cee8b794b67.png" alt="Inheritance diagram of pyamp.config.option.ClBoolOption" usemap="#inheritanced8d0aade98" class="inheritance"/>
<map id="inheritanced8d0aade98" name="inheritanced8d0aade98">
<area shape="rect" href="#pyamp.config.option.ClOption" title="pyamp.config.option.ClOption" alt="" coords="20,84,228,111"/>
<area shape="rect" href="#pyamp.config.option.ClBoolOption" title="pyamp.config.option.ClBoolOption" alt="" coords="5,161,243,188"/>
<area shape="rect" href="#pyamp.config.option.Option" title="pyamp.config.option.Option" alt="" coords="25,7,223,33"/>
</map>
</p>
<dl class="class">
<dt id="pyamp.config.option.ClBoolOption">
<em class="property">class </em><tt class="descclassname">pyamp.config.option.</tt><tt class="descname">ClBoolOption</tt><big>(</big><em>name</em>, <em>abbr=None</em>, <em>defaultValue=False</em>, <em>helpText=None</em>, <em>acceptedValues=None</em>, <em>caseSensitive=False</em><big>)</big><a class="reference internal" href="../_modules/pyamp/config/option.html#ClBoolOption"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyamp.config.option.ClBoolOption" title="Permalink to this definition">¶</a></dt>
<dd><p>The ClBoolOption encapsulates a boolean configuration option.</p>
<p>If the boolean does not exist, the option will be set to the default value
otherwise it will be set to the inverse of the default value.</p>
<ul class="simple">
<li>name &#8211; The name of the option</li>
<li>abbr &#8211; The abbreviated name for the option</li>
<li>defaultValue &#8211; The default value (True or False)</li>
<li>helpText &#8211; The help text for this option</li>
<li>acceptedValues &#8211; The list of accepted values</li>
<li>caseSensitive &#8211; True if the accepted values are case sensitive</li>
</ul>
</dd></dl>

</div>
<div class="section" id="the-option-class">
<h2>The Option class<a class="headerlink" href="#the-option-class" title="Permalink to this headline">¶</a></h2>
<p class="graphviz">
<img src="../_images/inheritance-388ec1e66f2f5a20a68b7f88b61268672b1a3729.png" alt="Inheritance diagram of pyamp.config.option.Option" usemap="#inheritance8813a8b1b0" class="inheritance"/>
<map id="inheritance8813a8b1b0" name="inheritance8813a8b1b0">
<area shape="rect" href="#pyamp.config.option.Option" title="pyamp.config.option.Option" alt="" coords="5,7,203,33"/>
</map>
</p>
<dl class="class">
<dt id="pyamp.config.option.Option">
<em class="property">class </em><tt class="descclassname">pyamp.config.option.</tt><tt class="descname">Option</tt><big>(</big><em>name</em>, <em>defaultValue=None</em>, <em>typeFn=None</em>, <em>commandLine=False</em>, <em>acceptedValues=None</em>, <em>caseSensitive=True</em><big>)</big><a class="reference internal" href="../_modules/pyamp/config/option.html#Option"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyamp.config.option.Option" title="Permalink to this definition">¶</a></dt>
<dd><p>The Option class encapsulates a single configuration option. It contains
the name of the option, a default value for the option, as well as a
function to convert the option into a specific type.</p>
<ul class="simple">
<li>name &#8211; The name of the option</li>
<li>defaultValue &#8211; The default value for this option</li>
<li>typeFn &#8211; The function to convert the value to a specific type</li>
<li>commandLine &#8211; True to be a command line option</li>
<li>acceptedValues &#8211; The list of accepted values</li>
<li>caseSensitive &#8211; True if the accepted values are case sensitive</li>
</ul>
<dl class="method">
<dt id="pyamp.config.option.Option.convert">
<tt class="descname">convert</tt><big>(</big><em>value</em><big>)</big><a class="reference internal" href="../_modules/pyamp/config/option.html#Option.convert"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyamp.config.option.Option.convert" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert the given value into the expected type for this Option.</p>
<ul class="simple">
<li>value &#8211; The value to convert</li>
</ul>
</dd></dl>

<dl class="method">
<dt id="pyamp.config.option.Option.getAcceptedValues">
<tt class="descname">getAcceptedValues</tt><big>(</big><big>)</big><a class="headerlink" href="#pyamp.config.option.Option.getAcceptedValues" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the list of accepted values for this Option.</p>
</dd></dl>

<dl class="method">
<dt id="pyamp.config.option.Option.getDefaultValue">
<tt class="descname">getDefaultValue</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/pyamp/config/option.html#Option.getDefaultValue"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyamp.config.option.Option.getDefaultValue" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the default value for this Option.</p>
</dd></dl>

<dl class="method">
<dt id="pyamp.config.option.Option.getName">
<tt class="descname">getName</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/pyamp/config/option.html#Option.getName"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyamp.config.option.Option.getName" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the name of this Option.</p>
</dd></dl>

<dl class="method">
<dt id="pyamp.config.option.Option.isAcceptedValue">
<tt class="descname">isAcceptedValue</tt><big>(</big><em>value</em><big>)</big><a class="headerlink" href="#pyamp.config.option.Option.isAcceptedValue" title="Permalink to this definition">¶</a></dt>
<dd><p>Determine if the given value is one of the accepted values for
this Option.</p>
<ul class="simple">
<li>value &#8211; The value to check</li>
</ul>
</dd></dl>

<dl class="method">
<dt id="pyamp.config.option.Option.isCommandLine">
<tt class="descname">isCommandLine</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/pyamp/config/option.html#Option.isCommandLine"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyamp.config.option.Option.isCommandLine" title="Permalink to this definition">¶</a></dt>
<dd><p>Determine if this Option is configurable through the command
line.</p>
</dd></dl>

</dd></dl>

</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">The option module</a><ul>
<li><a class="reference internal" href="#the-cloption-class">The ClOption class</a></li>
<li><a class="reference internal" href="#the-clbooloption-class">The ClBoolOption class</a></li>
<li><a class="reference internal" href="#the-option-class">The Option class</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="pyamp_config_configFile.html"
                        title="previous chapter">The configFile module</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="pyamp_config_parser.html"
                        title="next chapter">The parser module</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/_generated/pyamp_config_option.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" size="18" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="pyamp_config_parser.html" title="The parser module"
             >next</a> |</li>
        <li class="right" >
          <a href="pyamp_config_configFile.html" title="The configFile module"
             >previous</a> |</li>
        <li><a href="../index.html">pyamp v1.2 documentation</a> &raquo;</li>
          <li><a href="mod_pyamp.html" >The pyamp module</a> &raquo;</li>
          <li><a href="mod_pyamp_config.html" >The config module</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2012, Brett Ponsler.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.1.
    </div>
  </body>
</html>